package leetcode

import (
	"fmt"
	"testing"
)

type question928 struct {
	para928
	ans928
}

// para 是参数
// one 代表第一个参数
type para928 struct {
	graph   [][]int
	initial []int
}

// ans 是答案
// one 代表第一个答案
type ans928 struct {
	one int
}

func Test_Problem928(t *testing.T) {

	qs := []question928{

		{
			para928{[][]int{{1, 0, 0, 0}, {0, 1, 1, 1}, {0, 1, 1, 0}, {0, 1, 0, 1}}, []int{1, 3}},
			ans928{1},
		},
		{
			para928{[][]int{{1, 1, 1, 0}, {1, 1, 0, 0}, {1, 0, 1, 0}, {0, 0, 0, 1}}, []int{3, 2}},
			ans928{2},
		},

		{
			para928{[][]int{{1, 1, 0}, {1, 1, 1}, {0, 1, 1}}, []int{0, 1}},
			ans928{1},
		},

		{
			para928{[][]int{{1, 1, 0}, {1, 1, 0}, {0, 0, 1}}, []int{0, 1}},
			ans928{0},
		},

		{
			para928{[][]int{{1, 1, 0, 0}, {1, 1, 1, 0}, {0, 1, 1, 1}, {0, 0, 1, 1}}, []int{0, 1}},
			ans928{1},
		},

		{
			para928{[][]int{{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 1}, {0, 0, 1, 1}}, []int{3, 1}},
			ans928{3},
		},

		{
			para928{[][]int{{1, 0, 0, 0, 0, 0}, {0, 1, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 0}, {0, 0, 0, 1, 1, 0}, {0, 0, 0, 0, 0, 1}}, []int{5, 0}},
			ans928{0},
		},
	}

	fmt.Printf("------------------------Leetcode Problem 928------------------------\n")

	for _, q := range qs {
		_, p := q.ans928, q.para928
		fmt.Printf("【input】:%v       【output】:%v\n", p, minMalwareSpread2(p.graph, p.initial))
	}
	fmt.Printf("\n\n\n")
}
